home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine CD 1995 / Archive Magazine CD 1995.iso / discs / pipeline / abacus / p_line / DataBase3 / ReadMe < prev    next >
Encoding:
Text File  |  1992-11-19  |  8.4 KB  |  149 lines

  1. %OP%VS4.13 (28-Apr-92), Gerald L Fitton, R4000 5966 9904 9938 
  2. %OP%DP0
  3. %OP%IRY
  4. %OP%PL0
  5. %OP%HM0
  6. %OP%FM0
  7. %OP%BM0
  8. %OP%LM4
  9. %OP%PT1
  10. %OP%PDPipeLine
  11. %OP%WC834,2070,184,1620,0,0,0,0
  12. %CO:A,72,72%
  13. %C%PipeDream as a 'Multifile' DataBase
  14. %C%By Gerald L Fitton
  15. Keywords:
  16. Beginners Database Multifile Fitton
  17.  
  18. In this article I hope to introduce you to the use of PipeDream as a 
  19. 'Multifile' database.  Some of you familiar with say DBase (on a PC) 
  20. may cringe a little at some of the nonstandard terms which I am going 
  21. to use, but remember that this is intended for PipeDream users so I 
  22. want to use terms that will be understood.  My example uses two 
  23. dependent documents plus a letter.
  24.  
  25. Databases contain similar information about many similar things.  For 
  26. example you could have a database containing information about your 
  27. compact discs or another with information about your friends' names, 
  28. addresses and telephone numbers.  As we have seen in DataBase1, a 
  29. simple database consists of a single file.  That one file contains all 
  30. the information you have and need about those things; this means one 
  31. file for 'Compact Discs' and another file for 'Friends'.
  32.  
  33. A file consists of Records, one row per record.  Taking the example of 
  34. your friends, you would have one record for each friend.  Using 
  35. PipeDream (and not using the multi-row record facility) all the 
  36. information you want to store about a single person would be found in 
  37. one row - so all the information about Fred Bloggs might be found in 
  38. row 13 (lucky for some).  Each record consists of many Fields.  Each 
  39. field is a particular piece of information, for example 'Bloggs' would 
  40. be in the field called 'Surname' (or family name) and you would use a 
  41. different field for telephone number.  Using PipeDream, one column is 
  42. used for each field.  You could put everybody's surname in the first 
  43. field, column A, and everybody's telephone number in the tenth field, 
  44. column J.  It is important that you do not mix the fields up.  For 
  45. example, if one address is shorter than another (perhaps because you 
  46. don't know Fred's post code to enter into the 9th field - column I) 
  47. then that missing field (slot I13) must be left blank.  Do not move the 
  48. telephone number into the 9th field.  Such a file can be sorted on any 
  49. field (eg to group together everybody with an 01-200 telephone number) 
  50. and then you can do operations on a marked block (eg search and replace 
  51. the 01 with 071 - have I got it right or should I have replaced with 
  52. 081?) finally putting the file back in alphabetical order of surname.  
  53. You can use mail merge techniques to print out labels or customised 
  54. mail shots.  (Dear Fred - Out of all the people in Any Street, 
  55. Yourtown, you Mr Bloggs have been specially selected for our super 
  56. duper prize draw . . . . now just buy one of our new fangled whatsits).
  57.  
  58. One use for a database might be for a club which loans out specialist 
  59. DIY tools to its members.  This is the example I have chosen (but don't 
  60. load it yet).  You could have the tool in the first field (column A) 
  61. and the club member's membership number in another field followed by 
  62. date of loan, hire charges, etc, in other fields.  You may want to send 
  63. a reminder to a member that a tool has not been returned.  More usually 
  64. you may want to send a similar 'customised' letter to all members who 
  65. have been tardy at returning their borrowed tools.  In your innocence 
  66. you may think you must either store the full name and address of the 
  67. member in the [Tools] file (for every tool they borrow!) or look up the 
  68. member's name and address against their membership number (manually) in 
  69. a second [Members] file.  Well, not if you have a 'Multifile' database.
  70.  
  71. With a 'Multifile' database you can pick up 'cross referenced' data 
  72. automatically from one file to another.  In the example above (the 
  73. reminder to return a tool) you want your form letter exercise to pick 
  74. up that the tool should have been returned but hasn't (that's the easy 
  75. bit - search or sort the [Tool] file) and then, using the name of the 
  76. hirer from the [Tools] file, look up the hirer's address in the 
  77. [Members] file (ie get the 'cross reference') and print the address in 
  78. the form letter in the slots reserved for it.
  79.  
  80. Using the 'Dependent Documents' facility of PipeDream you can, with 
  81. some thought and care, use it as a 'Multifile' database.  Double click 
  82. on the file in this directory called [Letter]; it and two other files, 
  83. [Members] and [Tools], will also be loaded.  Set up your screen so that 
  84. at the top left is the file called [Tools], at the top right one called 
  85. [Members] and the bottom widow contains the file [Letter].
  86.  
  87. This simple [Tools] file consists of three columns containing: column 
  88. A, the tool borrowed, column B, the tool club member's membership 
  89. number, and column C, the date when the tool is due for return.  The 
  90. date 10 June 90 is entered by using 'Edit Function' and typing in 
  91. 10.6.90 and pressing <Return>.  There are no cross references in the 
  92. [Tools] file.  The [Members] file as shown here also contains three 
  93. columns: column A, the member's membership number, column B, their 
  94. Surname, and column C, their Forenames.  Of course you could extend 
  95. this to include their address and the date on which their subscription 
  96. is due, etc.  Again, there are no cross references but, when you lend a 
  97. tool out, you must be sure that you enter the member's number in the 
  98. [Tools] file.  Although [Tools] and [Members] have the members in the 
  99. same order, this is just coincidence; you can sort the files 
  100. independently into any order (date, tool, surname, etc) by any field 
  101. and the relational database will still 'work'.
  102.  
  103. It is in the 'Letter' file that all the cross references occur.  The 
  104. entry in [Letter]B2 has to be typed in by the letter writer.  It can 
  105. contain the tool name, Drill06 or, in my view better, [Tools]A5.  Slots 
  106. [Letter]A2 to [Letter]A6 are typed in in the usual way but [Letter]B2 
  107. to [Letter]B6 contain the cross references.  One of the more complex 
  108. ones, [Letter]B5, has a double cross reference.  Place the cursor in 
  109. slot [Letter]B5 and you will see the double 'lookup' formula.  The 
  110. effect of all this is that column [Tools]A is searched for the tool 
  111. shown in [Letter]B2.  When it is found, the member's number (in the 
  112. same row as the tool but in the column [Tools]B) and the due date (from 
  113. the column [Tools]C) are entered into [Letter]B4 and [Letter]B3 
  114. respectively.  [Letter]B5 and [Letter]B6 carry out a similar lookup for 
  115. the member's number, but, having found it, that number is matched in 
  116. the [Members]A column and the values of the Surname and Forenames from 
  117. the [Members]B and [Members]C columns are transferred to the [Letter]B5 
  118. and [Letter]B6 slots.  Once you have written the letter, the next 
  119. letter can be generated automatically by changing the content of slot 
  120. [Letter]B2 from [Tools]A5 to [Tools]A6.  All the cross references such 
  121. as members's number, name, etc will automatically appear in the slots 
  122. [Letter]B3 to [Letter]B6.  Of course, if you have an address for the 
  123. member in other columns of the [Members] file then these can be 
  124. automatically transferred in the same way.
  125.  
  126. The letter itself can contain references to the slots [Letter]B2 to 
  127. [Letter]B6.  As an example, the letter proper, which starts in 
  128. [Letter]A8 contains: "Dear @@B6@@ @@B5@@" so that "Fred Bloggs" gets 
  129. transferred automatically from the slots B6 and B5 into the space after 
  130. the word "Dear".  The slot A10 contains: "Our records show that the 
  131. tool @@B2@@@@@ should have been returned by @@B3@@@@@ . . . .".  The effect 
  132. of the @@ signs immediately before and after the B6 and B5 is to 
  133. transfer the data from B2 and B3 into the body of the letter.  You 
  134. should put in a few extra @ signs so that you can guarantee that the 
  135. line will format correctly.  You can use 'Format paragraph' in the 
  136. usual way on the bodytext of the letter.
  137.  
  138. A nice touch (not shown here for clarity) is to keep the slots 
  139. [Letter]B2 to [Letter]B6 off screen, say in slots D2 to D6, and reduce 
  140. the width of column D to zero before printing.  There are other ways of 
  141. achieving the same effect such as printing a marked block or a range of 
  142. columns.  But perhaps you want the references printed?
  143.  
  144. You may have noticed that the [Tools] and [Members] files have each two 
  145. blank rows (rows 4 and 9) which are included in the database lookup 
  146. formulae.  This is so that you can mark rows 5 to 8 of the [Tools] and 
  147. [Members] files and sort them without the lookup references in the 
  148. letter file being updated.
  149.